package com.piz.service.common;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class AppCache implements Cloneable{
	
	private static AppCache appCache;
	
	private Map<String, Object> cache = new HashMap<String, Object>(); 
	
	static
	{
		appCache =  new AppCache();
		
	}
	private AppCache(){
		cache = Collections.synchronizedMap(cache);
	}
	public static AppCache getInstance()
	{
		return appCache;
	}
	public void setCartInfo(String key, Object value){
		cache.put(key, value);
	}
	public Object getCartInfo(String key){
		return cache.get(key);
	}
	@Override
	protected Object clone() throws CloneNotSupportedException {
		 throw new CloneNotSupportedException();
		
	}

}
